<?php
$page = 'user';
require_once 'header.php';
?>
    <h3>Create an account for free</h3> 
    <?php
    if (isset($_GET['status'])) {
        $status = $_GET['status'];
        if ($status == "wrong") {
            ?>
            <p style="color: red">Registration was not successful!</p>
            <?php
        } else if ($status == "wrongu") {
            ?>
            <p style="color: red">Username has already being taken!</p>
            <?php
        } else if ($status == "wrongp") {
            ?>
            <p style="color: red">Your passwords don't match!</p>
            <?php
        }
    }
    ?>
    <script type="text/javascript">
        jQuery(document).ready(function(){
            jQuery("#signup_form").validationEngine();
        });

    </script>

    <form method="post" action="../actions/signup.php" id="signup_form" >
        <table class="table">
            <tr class="row_start"><td style="width: 50%">Username: </td><td ><input type="text" class="validate[required] wide" name="username" id="username"/></td></tr>
            <tr class="row_start"><td style="width: 50%">Phone no: </td><td ><input type="text" class="validate[required] wide" name="phone_number" id="phone_number"/></td></tr>
            <tr class="row_alt_start"><td>Password: </td><td><input type="password" class="validate[required] wide" name="password" id="password" /></td></tr>
            <tr class="row_start"><td>Confirm Password: </td><td><input type="password" class="validate[required] wide" name="confirm_password" id="confirm_password" /></td></tr>
            <tr><td></td><td><input type="submit" value="submit" /></td></tr>
        </table>
    </form>	
    <p></p><br/>
    <p>If you already have an account <a href="login.php">Login here</a></p>
    <?php require_once('footer.php'); ?>